﻿<Window x:Class="Bauble.Common.Settings.ConfigurationWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Bauble.Common.Settings"
    Title="Bauble Settings" ShowInTaskbar="True" ResizeMode="NoResize"
    WindowStartupLocation="CenterScreen"
        Width="297px" Height="345px">
    <Window.Resources>
        <Style TargetType="Button">
            <Setter Property="Margin" Value="0,0,5,0" />
            <Setter Property="Height" Value="22px" />
            <Setter Property="Width" Value="75px" />
            <Setter Property="Canvas.Top" Value="290px" />
        </Style>
        <Style TargetType="TabControl">
            <Setter Property="Margin" Value="5,5,5,5" />
        </Style>
        <Style TargetType="CheckBox">
            <Setter Property="Margin" Value="0,7,0,0"/>
        </Style>
        <Style TargetType="RowDefinition">
            <Setter Property="Height" Value="28"/>
        </Style>
        <Style TargetType="ComboBox">
            <Setter Property="Margin" Value="0,2,0,2"/>
        </Style>
    </Window.Resources>
    <StackPanel Orientation="Vertical">
        <TabControl Width="280" Height="280" DataContext="{x:Static local:BaubleSettings.Instance}">
            <TabItem Header="Behavior">
                <Grid> 
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <!-- 7 Rows -->
                        <RowDefinition /><RowDefinition /><RowDefinition /><RowDefinition />
                        <RowDefinition /><RowDefinition /></Grid.RowDefinitions>
                    <Label Grid.Row="0" Grid.Column="0">Auto Hide?</Label>
                    <CheckBox Grid.Row="0" Grid.Column="1" IsChecked ="{Binding Path=AutoHideDock}"/>
                    
                    <Label Grid.Row="1" Grid.Column="0">Show Delay</Label>
                    <Slider Grid.Row="1" Grid.Column="1" Minimum="0" Maximum="1000" Value="{Binding Path=ShowTimerMilliseconds}"/>
                    <Label Grid.Row="2" Grid.Column="0">Show Length</Label>
                    <Slider Grid.Row="2" Grid.Column="1" Minimum="0" Maximum="1000" Value="{Binding Path=ShowAnimationDuration}"/>

                    <Label Grid.Row="3" Grid.Column="0">Hide Delay</Label>
                    <Slider Grid.Row="3" Grid.Column="1" Minimum="0" Maximum="1000" Value="{Binding Path=HideTimerMilliseconds}"/>
                    <Label Grid.Row="4" Grid.Column="0">Hide Length</Label>
                    <Slider Grid.Row="4" Grid.Column="1" Minimum="0" Maximum="1000" Value="{Binding Path=HideAnimationDuration}"/>

                    <Label Grid.Row="5" Grid.Column="0">Icon Flow</Label>
                    <ComboBox x:Name="IconFlowComboBox" Grid.Row="5" Grid.Column="1" 
                              ItemsSource="{Binding Path=IconFlows}"
                              DisplayMemberPath="Name"
                              SelectedValuePath="TypeName"
                              SelectedValue="{Binding Path=IconFlow.TypeName}"></ComboBox>
                </Grid>
            </TabItem>
            <TabItem x:Name="ThemeTab" Header="Theme">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Label Grid.Row="0" Grid.Column="0">Theme:</Label>
                    <ComboBox x:Name="ThemeComboBox" Grid.Row="0" Grid.Column="1"
                              ItemsSource="{Binding Path=Themes}"
                              DisplayMemberPath="Name"
                              SelectedValuePath="FileName"
                              SelectedValue="{Binding Path=Theme.FileName}"/>
                </Grid>
            </TabItem>
        </TabControl>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
            <Button x:Name="OKButton" IsDefault="True" Click="OKButton_Click">OK</Button>
            <Button x:Name="CancelButton" IsCancel="True" Click="CancelButton_Click">Cancel</Button>
        </StackPanel>
    </StackPanel>
</Window>
